<template>
  <div class="top-nav">
    <div class="logo">数字小浪底</div>
    <div class="nav-items">
      <div class="nav-group left">
        <router-link to="/" class="nav-item" active-class="active">综合监视</router-link>
        <router-link to="/forecast" class="nav-item" active-class="active">预报</router-link>
        <router-link to="/warning" class="nav-item" active-class="active">预警</router-link>
      </div>
      <div class="main-title">防汛调度</div>
      <div class="nav-group right">
        <router-link to="/prediction" class="nav-item" active-class="active">预测</router-link>
        <router-link to="/plan" class="nav-item" active-class="active">预案</router-link>
        <router-link to="/monitor" class="nav-item" active-class="active">业务处理</router-link>
      </div>
    </div>
    <div class="user-actions">
      <el-icon class="el-icon" @click="toggleFullScreen"><FullScreen /></el-icon>
      <el-icon class="el-icon"><User /></el-icon>
      <el-icon class="el-icon"><Microphone /></el-icon>
    </div>
  </div>
</template>

<script setup lang="ts">
import { FullScreen, User, Microphone } from '@element-plus/icons-vue'

const toggleFullScreen = () => {
  if (!document.fullscreenElement) {
    document.documentElement.requestFullscreen();
  } else {
    document.exitFullscreen();
  }
}
</script>

<style lang="scss" scoped>
.top-nav {
  height: 60px;
  background: linear-gradient(180deg,
    rgba(13, 19, 35, 0.9) 0%,
    rgba(13, 19, 35, 0.7) 100%,
  );
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: relative;
  border-bottom: 1px solid rgba(63, 158, 255, 0.1);

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
      rgba(48, 207, 208, 0.2) 0%,
      rgba(48, 207, 208, 0.6) 50%,
      rgba(48, 207, 208, 0.2) 100%
    );
  }

  .logo {
    font-size: 24px;
    color: #fff;
    font-weight: bold;
    position: relative;
    padding-right: 40px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }

  .nav-items {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 100px;

    .nav-group {
      display: flex;
      gap: 40px;
    }

    .main-title {
      font-size: 32px;
      font-weight: bold;
      color: #30cfd0;
      text-shadow: 0 0 20px rgba(48, 207, 208, 0.5);
      letter-spacing: 2px;
    }

    .nav-item {
      padding: 6px 12px;
      cursor: pointer;
      transition: all 0.3s;
      position: relative;
      color: rgba(255,255,255,0.7);
      font-size: 16px;
      background: rgba(48, 207, 208, 0);
      border-radius: 4px;
      text-decoration: none;
      
      &.active {
        color: #fff;
        background: rgba(48, 207, 208, 0.2);
        box-shadow: inset 0 0 10px rgba(48, 207, 208, 0.1);
      }

      &:hover {
        color: #fff;
        background: rgba(48, 207, 208, 0.1);
      }
    }
  }

  .user-actions {
    display: flex;
    gap: 20px;
    font-size: 20px;
    color: rgba(255,255,255,0.7);

    .el-icon {
      cursor: pointer;
      transition: all 0.3s;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      background: rgba(48, 207, 208, 0.1);
      border: 1px solid rgba(48, 207, 208, 0.2);
      
      &:hover {
        color: #fff;
        transform: scale(1.1);
        background: rgba(48, 207, 208, 0.2);
        border-color: rgba(48, 207, 208, 0.3);
      }
    }
  }
}
</style> 